@@ -76,9 +76,12 @@ $(document).ready -> |
||
| 76 | 76 |
$("#logs .spinner").stop(true, true).fadeOut ->
|
| 77 | 77 |
$("#logs .refresh, #logs .clear").show()
|
| 78 | 78 |
|
| 79 |
- $(".agent-show #show-tabs a[href='#logs']").on "click", fetchLogs
|
|
| 80 |
- $("#logs .refresh").on "click", fetchLogs
|
|
| 81 |
- $("#logs .clear").on "click", clearLogs
|
|
| 79 |
+ $(".agent-show #show-tabs a[href='#logs'], #logs .refresh").on "click", fetchLogs
|
|
| 80 |
+ $(".agent-show #logs .clear").on "click", clearLogs
|
|
| 81 |
+ |
|
| 82 |
+ if tab = window.location.href.match(/tab=(\w+)\b/i)?[1] |
|
| 83 |
+ if tab in ["details", "logs"] |
|
| 84 |
+ $(".agent-show .nav-tabs li a[href='##{tab}']").click()
|
|
| 82 | 85 |
|
| 83 | 86 |
# Editing Agents |
| 84 | 87 |
$("#agent_source_ids").on "change", showEventDescriptions
|
@@ -11,7 +11,7 @@ module ApplicationHelper |
||
| 11 | 11 |
if agent.working? |
| 12 | 12 |
'<span class="label label-success">Yes</span>'.html_safe |
| 13 | 13 |
else |
| 14 |
- '<span class="label label-warning">No</span>'.html_safe |
|
| 14 |
+ link_to '<span class="label label-warning">No</span>'.html_safe, agent_path(agent, :tab => (agent.recent_error_logs? ? 'logs' : 'details')) |
|
| 15 | 15 |
end |
| 16 | 16 |
end |
| 17 | 17 |
end |